//
//  WalletRecordTableViewCell.m
//  sklive
//
//  Created by Macx on 2017/7/7.
//  Copyright © 2017年 Macx. All rights reserved.
//

#import "WalletRecordTableViewCell.h"
#import "NSString+Common.h"

#import "CashLog.h"

@implementation WalletRecordTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.contentView.backgroundColor = kWhiteColor;
    
    CGSize nickNameSize = [LZCTools textSizeWithText:@"字数" font:kUHSystemFontWithSize(15)];
    CGSize moneySize = [LZCTools textSizeWithText:@"字数" font:kUHSystemFontWithSize(16)];
    
    // 用以前的视图，所以乱
    
    self.state.font = kUHSystemFontWithSize(16);
    self.state.frame = CGRectMake(20, 10, SCREEN_WIDTH-80, moneySize.height);
//    self.state.frame = CGRectMake(20, SW(7)+10-nickNameSize.height, SW(2)-20, nickNameSize.height);

    self.time.font = kUHSystemFontWithSize(15);
//    self.time.frame = CGRectMake(20, 10, SW(2)*3/2-20, nickNameSize.height);
    self.time.frame  =CGRectMake(20, SW(7)+10-nickNameSize.height, self.state.width, nickNameSize.height);
    
    
    self.money.font = kUHSystemFontWithSize(16);
    self.money.frame = CGRectMake(SCREEN_WIDTH-SW(4)-20, self.centerY-moneySize.height/2, SW(4), moneySize.height);
    
}


- (void)setModel:(CashLog *)model {
    
    if (_model != model) {
        _model = model;
        
        self.time.text = [NSString timeWithTimeIntervalString:[model valueForKey:@"create_time"]];
        //        ，charge 充值 buy_live 购买直播观看 generalize 返佣 other 其他 withdraw 提现
        
        
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
